package com.ihteima.config;

import com.ihteima.interceptor.JwtTokenUserInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName: WebCofig
 * Package: com.ihteima.config
 * Description:
 *
 * @Auther gongkaiming
 * @Create 2025/10/26 18:46
 * @Version 1.0
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    
    @Autowired
    private JwtTokenUserInterceptor jwtTokenUserInterceptor;
    
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(jwtTokenUserInterceptor).excludePathPatterns("/user/login", "/user/registry");
        
    }
}
